# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgbase=gtkspellmm
pkgname=(gtkspellmm gtkspellmm-docs)
pkgver=3.0.5
pkgrel=4
url="http://gtkspell.sourceforge.net/"
pkgdesc="C++ binding for gtkspell"
arch=(loong64 x86_64)
license=(GPL)
depends=(gtkmm3 gtkspell3)
makedepends=(gtkmm3-docs)
source=(https://downloads.sourceforge.net/gtkspell/$pkgbase-$pkgver.tar.xz)
sha256sums=('5b875a5753ce593274d0c6e803af6300973020c5443905999aba96ed3cef1545')

build() {
  cd $pkgbase-$pkgver
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package_gtkspellmm() {
  cd $pkgbase-$pkgver
  make DESTDIR="$pkgdir" install doc_subdirs=
}

package_gtkspellmm-docs() {
  pkgdesc="Developer documentation for gtkspellmm"
  depends=(gtkmm3-docs)

  cd $pkgbase-$pkgver
  make -C doc DESTDIR="$pkgdir" install
}
